package com.sky.myapplication.java.weight;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;

import androidx.annotation.Nullable;

import com.sky.myapplication.R;

public class MyLinearLayoutOne extends LinearLayout {
    public MyLinearLayoutOne(Context context) {
        super(context);
        init(context);
    }

    public MyLinearLayoutOne(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        init(context);
    }

    public MyLinearLayoutOne(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init(context);
    }


    private void init(Context context){
        LayoutInflater mInflater = LayoutInflater.from(context);
        View mView = mInflater.inflate(R.layout.viewgroup_my_linearlayout, null);
        addView(mView);
    }
}
